Nations
A nation consists of a nation file in the rulesets and a flag in the tilesets. How to add a Nation To add a nation of your own, you should look at the following files: ;data/nation/.ruleset :This is the new nation, which you will have to create. It may help to copy one of the other nation files over and edit it. The name should be the same as the name of the nation inside the ruleset file. ;data/default/nations.ruleset :This lists all nation files. Add your nation to this list. ;data/flags/* :This is the flags directory. You will have to add a flag for your nation to work (see below). ;data/scenario/* :You can add starting position for your nation on a scenario map. Before a nation can be included in the main distribution, the following files will also have to be edited. Unless you know what you're doing you shouldn't need to worry about this. ;data/nation/Makefile.am :Another list of nation files - add .ruleset to this list. ;data/flags/Makefile.am :Another list of flag files - add your flag file to this list. ;po/POTFILES.in :Here is yet another list of nations files; again add data/nation/.ruleset to it. How to add a Flag Overview Please note that Freeciv no longer uses XPM files. PNG is the preferred form for graphics, and flags should be made exclusively in SVG. A new nation needs a new flag. As of Freeciv 2.1 all flags are stored in SVG (Scalable Vector Graphics) format. Sodipodi and Inkscape are two good SVG editors. If you are creating a real-world nation you can probably find a Free or public domain flag that can be used. One good place to look is the Sodipodi clipart section. Remember that any flags we add must be licenced under the GPL and should be attributed to their original author, so make a note of where you found the flag, what its licence is, and who made it. We also welcome improvements to existing flags. Most of our existing flags come from the Sodipodi clipart collection, and some of them are less than perfect. One common problem is that the colors are wrong. If you fix a flag for a real nation be sure to cite your source so we can be sure it's accurate. Good sources for nation flag data are Wikipedia or Flagspot. If you want to add or improve a flag for a fantasy nation, this is also welcome. We recommend you first contact the original author of the flag (see the CREDITS file) to discuss your ideas for changes. Flag Guidelines Here are a few guidelines for flags: * Flags should be rectangles, since an outline is added to them automatically. * Flags often come in multiple aspect ratios. A 3:2 ratio looks best for Freeciv. 2:1 or 4:3 are also common (many current flags use these ratios). For a flag that is "supposed" to be 2:1 or 4:3, you can often find a 3:2 version as well. Pick the one that looks best. Flag Specifics To add a flag you'll have to edit the following files: ;data/flags/.svg :Here is the SVG flag image. This is not used directly by Freeciv but is rendered into PNG files (at various resolutions for different tilesets). The SVG file is not used in Freeciv 2.0 but all the other steps for adding flags are the same. The name should be the same as the name of the nation in the ruleset (although currently many flags do not follow this). ;data/flags/.png ;data/flags/-shield.png :These are the flag images that are used by Freeciv. They are rendered automatically from the SVG file. The conversion program is not included in Freeciv 2.0 so you should download the development version which does have it. Once this file has been created it can be used with older versions of Freeciv as well. To run the conversion program you will need to install Inkscape, ImageMagick, and (optionally) pngquant. Once these are installed change to the data/flags directory and run "./convert_png .svg". ;data/misc/flags.spec :This file has a reference to the flag PNG graphic. The "tag" here must match the flag tag you put in the nation.ruleset file (usually f., and the "file" should point to the PNG image at flags/.png. ;data/misc/shields.spec :Just like flags.spec, this file must include a reference to the flag PNG graphic. The only difference is that the file should point to the "shield" graphic, flags/-shield.png. Changes to the .spec files can be submitted as a patch (created using diff -ruN). Even though the *.spec files may need to be changed, please include them in the diff -- this should be easier for you, and it provides a convenient place for us to grab the sprite name. See the section on How to Contribute for more instructions. Nations Mini-FAQ These address a few problems and questions about adding nations. In what order should I list cities in Nation ruleset files? A discussion of city ordering appears in the freeciv-dev archive: * http://arch.freeciv.org/freeciv-dev-199910/msg00030.html There is even a perl script available to do the job in the same thread: * http://arch.freeciv.org/freeciv-dev-199910/msg00074.html What nations can be added to Freeciv with a ruleset file? Freeciv supports a classification of cities in modern, historical, and fictional. Modern nations are existing (independent) states, historical nations existed in past times but have ceased to exist (or have encountered a substantial change in their territory), and fictional nations are those that are products of the fantasy of a book writer. You should make a clear decision about the group of a nation you add. A modern nation must be restricted on the actual today's territory; you should leave out any cities not on this territory. Choosing leader names is not that restrict, but there should be a strong historical relation to the nation you create. The reason for this is, we don't want Freeciv to be used as a political vehicle for discussions about the borders or independence of nations and avoid trouble with other ruleset authors. What about geographical order of cities? Cities are not in geographical order. But there is a feature in Freeciv that supports city placement according to the geological environement of the (real) city. So it were nice if you add some attributes to the city names like hills, forest, river. The syntax for this is like this: "Mannheim (grassland, forest, river, !ocean)", "Bonn (plains, forest, river)", At this point, it is useful to put one city per line, only.